package com.atguigu.tingshu.user.service;

import com.atguigu.tingshu.model.user.UserInfo;
import com.atguigu.tingshu.vo.user.UserInfoVo;
import com.atguigu.tingshu.vo.user.UserPaidRecordVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

public interface UserInfoService extends IService<UserInfo> {

    Map<String, String> wxLogin(String code);

    UserInfoVo getUserInfoVoByUserId(Long userId);

    void updateUser(UserInfoVo userInfoVo, Long userId);

    Map<Long, Integer> userIsPaidTrackList(Long userId, Integer albumId, List<Long> trackIdList);

    /**
     * 判断用户是否购买过指定专辑
     *
     * @param userId
     * @param albumId
     * @return
     */
    Boolean isPaidAlbum(Long userId, Long albumId);

    List<Long> findUserPaidTrackList(Long userId, Long albumId);

    void saveUserPayRecord(UserPaidRecordVo userPaidRecordVo);

    void updateVipExpireStatus();
}
